package com.etcn.manager.service;


import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.etcn.manager.model.TUser;


public interface UserManagerService {
	/**
	 * check the user to decide whether it is rightful
	 * @param username
	 * @param password
	 * @return
	 */
	public TUser checkUser(String userName,String passWord);
	/**
	 * check the developer's user to decide whether it is rightful
	 * @param userName
	 * @param passWord
	 * @return
	 */
	public TUser checkDevUser(String userName,String passWord);
	
	/**
	 * find a user by username
	 * @param userName
	 * @return
	 */
	public  TUser getUserByUserName(String userName);
	/**
	 * save  a user entity
	 * @param user
	 * @return
	 */
	public boolean save(TUser user);
	/**
	 * update  a user entity
	 * @param user
	 * @return
	 */
	public boolean update(TUser user);
	/**
	 * check a username if exist or not
	 * @param userName
	 * @return
	 */
	public boolean checkUsernameExist(String userName);
	
	public Page<TUser> getUsersPageable(String userType,Pageable pageable);
	
	
}
